package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.OrderChannel;
import com.ruoyi.system.mapper.OrderChannelMapper;
import com.ruoyi.system.service.IOrderChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单渠道Service业务层处理
 *
 * @author hjf
 * @date 2025-05-28
 */
@Service
public class OrderChannelServiceImpl implements IOrderChannelService {
    @Autowired
    private OrderChannelMapper orderChannelMapper;

    /**
     * 查询订单渠道
     *
     * @param id 订单渠道主键
     * @return 订单渠道
     */
    @Override
    public OrderChannel selectOrderChannelById(Long id) {
        return orderChannelMapper.selectOrderChannelById(id);
    }

    /**
     * 查询订单渠道列表
     *
     * @param orderChannel 订单渠道
     * @return 订单渠道
     */
    @Override
    public List<OrderChannel> selectOrderChannelList(OrderChannel orderChannel) {
        return orderChannelMapper.selectOrderChannelList(orderChannel);
    }

    /**
     * 新增订单渠道
     *
     * @param orderChannel 订单渠道
     * @return 结果
     */
    @Override
    public int insertOrderChannel(OrderChannel orderChannel) {
        return orderChannelMapper.insertOrderChannel(orderChannel);
    }

    /**
     * 修改订单渠道
     *
     * @param orderChannel 订单渠道
     * @return 结果
     */
    @Override
    public int updateOrderChannel(OrderChannel orderChannel) {
        return orderChannelMapper.updateOrderChannel(orderChannel);
    }

    /**
     * 批量删除订单渠道
     *
     * @param ids 需要删除的订单渠道主键
     * @return 结果
     */
    @Override
    public int deleteOrderChannelByIds(Long[] ids) {
        return orderChannelMapper.deleteOrderChannelByIds(ids);
    }

    /**
     * 删除订单渠道信息
     *
     * @param id 订单渠道主键
     * @return 结果
     */
    @Override
    public int deleteOrderChannelById(Long id) {
        return orderChannelMapper.deleteOrderChannelById(id);
    }
}
